#include "Button.h"

#include <iostream>

#include "../../views/helpers/graphic/ColoursPalette.h"

using namespace Utils::GUI;


Button::Button()
{
	addChild(&Text);
}

void Button::SetShape(sf::Shape shape)
{
	Shape = shape;
}

void Button::SetText(sf::String text)
{
	removeChild(&Text);
	Text = GUI::Label(text);
	addChild(&Text);
}

void Button::SetText(Label text)
{
	removeChild(&Text);
	Text = text;
	addChild(&Text);
}

OKButton::OKButton()
	: Button()
{
	GUI::Label Text(L"OK", GUI::Label::CENTER, GUI::Label::MIDDLE);
	Text.SetTextHeight(30);
	Text.SetTextWidth(60);
	SetText(Text);
	SetShape(sf::Shape::Rectangle(0, 0, 60, 30, sf::Color(Views::Helpers::Graphic::Colours::LightAlt)));
}

